package cn.fz.ssedemo.config;

import io.swagger.v3.oas.models.OpenAPI;
import io.swagger.v3.oas.models.info.Contact;
import io.swagger.v3.oas.models.info.Info;
import io.swagger.v3.oas.models.info.License;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class SwaggerConfig {
    @Bean
    public OpenAPI customOpenAPI(){
        Contact contact = new Contact();
        contact.setName("开发部");
        return new OpenAPI()
                .info(new Info()
                .title("sse-测试平台接口文档")
                .contact(contact)
                .version("2.0.0")
                .description("sse-测试平台接口文档")
                .termsOfService("http://localhost:8888/doc.html")
                .license(new License().name("Apache 2.0").url("http://localhost:8888/doc.html")));
    }
}
